package com.bit.mybatis.mapper;

import com.bit.mybatis.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserInfoXmlMapper {
    List<UserInfo> selectAll();//alt+enter
    UserInfo selectById(Integer id);
    Integer insertUser(UserInfo userInfo);
    Integer insertUser2(@Param("user")UserInfo userInfo);
    Integer deleteById(Integer id);
    Integer updateById(String username,Integer id);

    Integer insertByConditon(UserInfo userInfo);

    Integer insertByConditon2(UserInfo userInfo);

    Integer updateByCondition(UserInfo userInfo);
    Integer updateByCondition2(UserInfo userInfo);

    List<UserInfo> selectByCondition(UserInfo userInfo);
    List<UserInfo> selectByCondition2(UserInfo userInfo);
    List<UserInfo> selectByCondition3(@Param("map") Map<String, Object> map);

    Integer batchDelete(List<Integer> ids);


}
